#include "Person.hpp"

#include <iostream>

istream &read(istream &in, Person &p) {
    in >> p.name_ >> p.address_;
    return in;
}

ostream &print(ostream &out, Person &p) {
    out << p.name() << " " << p.address();
    return out;
}

int main(void) {
    Person other;
    Person myself("gaozy", "Handan");
    Person xiaoq("xiaoq", "Changchun");
    Person xiaot("xiaot", "Qujing");

    print(std::cout, myself);
    std::cout << std::endl;

    print(std::cout, xiaoq);
    std::cout << std::endl;

    print(std::cout, xiaot);
    std::cout << std::endl;

    print(std::cout, other);
    std::cout << std::endl;

    return 0;
}
